using System;
using System.Collections.Generic;
using System.Text;

namespace BusinessLayer.Model
{
    /// <summary>
    /// Klasa bedaca swoistym elementem indeksu stron. Laczy strone Web ze slowem.
    /// </summary>
    public class IndexElement
    {
        /// <summary>
        /// Identyfikator elementu indeksu
        /// </summary>
        private int id;

        /// <summary>
        /// Strona Web przypisana do elementu indeksu
        /// </summary>
        private WebPage page;

        /// <summary>
        /// Pozycja na ktorej znajduje sie slowo powiazane z elementem indeksu w zawartosci strony Web
        /// </summary>
        private long offset;

        /// <summary>
        /// Slowo powiazane z elementem indeksu
        /// </summary>
        private Word word;

        public IndexElement()
        {
        }

        public IndexElement(WebPage page, long offset)
        {
            this.page = page;
            this.offset = offset;
        }

        public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }

        public virtual WebPage Page
        {
            get { return page; }
            set { page = value; }
        }

        public virtual long Offset
        {
            get { return offset; }
            set { offset = value; }
        }

        public virtual Word Word
        {
            get { return word; }
            set { word = value; }
        }
    }
}
